package com.xinxing.learning.batch.mapper.origin;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xinxing.learning.batch.entity.User;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.mapping.ResultSetType;
import org.apache.ibatis.session.ResultHandler;

public interface OriginUserMapper extends BaseMapper<User> {

    @Select("select * from test_user")
    @Options(resultSetType = ResultSetType.FORWARD_ONLY, fetchSize = Integer.MAX_VALUE)
    @ResultType(User.class)
    void streamQuery(ResultHandler<User> handler);
}
